const now = new Date();
console.log(now); // 输出当前⽇期和时间

function Rectangle(name, width, height) {
    this.name = name; // 分配name属性
    this.width = width; // 分配width属性Lab15 OOP 16
    this.height = height; // 分配height属性
    }

const rect1 = new Rectangle("矩形 1", 10, 10);
console.log(rect1.area());

const rect2 = Rectangle("矩形 2", 20, 10);
console.log(rect2.name); // 输出：undefined

const rect3 = new Rectangle("矩形 3", 30, 30);
console.log(rect3.area());

console.log(rect1.constructor);
console.log(rect2 instanceof Rectangle); // 输出：true
console.log(rect3 instanceof Date);

